package com.txazo.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.*;

/**
 * 用户退出Servlet
 * 
 * @author txazo
 * @since 1.0
 * 
 */
public class LogoutServlet extends HttpServlet {

	private static final long serialVersionUID = 1L;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		doPost(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		req.getSession().invalidate();
		resp.sendRedirect("login.html");
	}

}
